<div class="layui-fluid">
    <div class="layui-card">
      <div class="layui-card-body">
        <form class="layui-form" action="<?=url('deploy/edit');?>">
            <input type="hidden" name="id" value="<?=$info['id'];?>" />
            <div class="layui-form-item">
                <label class="layui-form-label">配置标识</label>
                <div class="layui-input-block ">
                    <input type="text" name="name" required lay-verify="required" value="<?=$info['name']?>" class="layui-input">
                    <div class="layui-form-mid layui-word-aux">用于Config类函数调用，只能使用英文且不能重复</div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">标题</label>
                <div class="layui-input-block">
                    <input type="text" name="title" required lay-verify="required" value="<?=$info['title']?>" class="layui-input">
                    <div class="layui-form-mid layui-word-aux">用于后台显示的配置标题</div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">配置区域</label>
                <div class="layui-input-inline">
                    <select name="area">
                        <?php foreach(c('type.deploy_area') as $key => $v):?>
                        <option value="<?=$key?>" <?php if($key==$info['area']):?>selected<?php endif;?>><?=$v?></option>
                        <?php endforeach;?>
                    </select>
                </div>
                <div class="layui-form-mid layui-word-aux">用于区分模块配置</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">配置类型</label>
                <div class="layui-input-inline">
                    <?php $deploy_type=c("type.deploy_type");?>
                    <select name="type">
                        <?php foreach(c('type.deploy_type') as $key => $v):?>
                        <option value="<?=$key?>" <?php if($key==$info['type']):?>selected<?php endif;?>><?=$v?></option>
                        <?php endforeach;?>
                    </select>
                </div>
                <div class="layui-form-mid layui-word-aux">系统会根据不同类型解析配置值</div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">配置分组</label>
                <div class="layui-input-inline">
                    <select name="group">
                        <?php foreach(c('type.deploy_group') as $key => $v):?>
                        <option value="<?=$key?>" <?php if($key==$info['group']):?>selected<?php endif;?>><?=$v?></option>
                    <?php endforeach;?>
                    </select>
                </div>
                <div class="layui-form-mid layui-word-aux">不分组则不显示在系统设置中</div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">配置值</label>
                <div class="layui-input-block">
                    <textarea placeholder="配置值" name="value" rows="5" class="layui-textarea"><?=$info['value']?></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">配置项</label>
                <div class="layui-input-block">
                    <textarea placeholder="配置项" name="extra" rows="4" class="layui-textarea"><?=$info['extra']?></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">说明</label>
                <div class="layui-input-block">
                    <textarea placeholder="说明" name="remark" rows="4" class="layui-textarea"><?=$info['remark']?></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-inline">
                    <input type="text" name="sort" required lay-verify="required|number" value="<?=$info['sort']?>" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">用于分组显示的顺序</div>
            </div>
          <div class="layui-form-item">
            <div class="layui-input-block">
              <button class="layui-btn" lay-submit lay-filter="myform">立即提交</button>
              <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
          </div>
        </form>
      </div>
    </div>
</div>
<script>
layui.use(['form'], function(){
  var $ = layui.$
  ,form = layui.form;
  form.render();
});
</script>
